<?php
include('Organization.php');

ini_set('max_execution_time', 300);

$school = new Organization;

$school->searchText = "computer+science";

 $myFile = "c:\crap\schools.txt";
        $fh = fopen($myFile, 'w') or die("can't open file");
for ($i=1;$i<7600;$i+=100) 
{

$school->startIdx = $i;    
$school->endIdx = $i + 99; 
    
$school->getOrganizations();

$assArray = $school->getIds();

       
       

foreach($assArray as $key=>$value) 
    { 
    fwrite($fh, $key.',"'.$value.'"'); 
     fwrite($fh, "\r\n");
    } 
}   
    fclose($fh);
?>